package org.chispa.api.query;

import java.util.Map;

import org.chispa.api.util.BadSyntaxException;
import org.chispa.api.util.NoSuitableVisitorException;
import org.chispa.api.visitors.ParamVisitor;

class SimpleExprParamWrapper extends SimpleParamWrapper<String,String, String> {
	
	private Map<String,String> params;

	SimpleExprParamWrapper(String expr,Map<String,String> params) {
		super(expr);
		this.params=params;
	}
	
	SimpleExprParamWrapper(String expr) {
		this(expr,null);
	}
	
	@Override
	public String acceptHash(ParamVisitor<String, String, String> visitor)
			throws NoSuitableVisitorException, BadSyntaxException {
		return visitor.visitHashExpr(this,params);
	}


}
